<?php

	class smartyInstance {
		
		/**
		 *
		 * @return Smarty smarty instance
		 * 
		 */
		public static final function getInstance() {
			
			$smarty = new Smarty;
			
			$smarty->template_dir = MUKU_DOC_ROOT . 'templates/';
			$smarty->compile_dir = MUKU_DOC_ROOT . 'templates/tmp/';
			$smarty->config_dir = MUKU_DOC_ROOT . 'templates/config/';
			$smarty->cache_dir = MUKU_DOC_ROOT . 'templates/cache/';
			
			// $smarty->caching = TRUE;
			// $smarty->debugging = TRUE;
			
			$smarty->assign('DOC_ROOT', MUKU_DOC_ROOT);
			$smarty->assign('WEB_ROOT', MUKU_WEB_ROOT);
			$smarty->assign('PHP_SELF', $_SERVER['PHP_SELF']);
			
			return $smarty;
			
		}
		
	}

?>
